package org.example.myleet.p1332;

public class Solution {
    public int removePalindromeSub(String s) {
        char[] charArr = s.toCharArray();
        int l = 0, r = charArr.length - 1;
        while (l < r) {
            if (charArr[l] != charArr[r]) {
                return 2;
            }
            ++l;
            --r;
        }
        return 1;
    }
}
